package com.trkj.vo;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 功能
 * 
 * @author Administrator
 *
 */
public class FunctionVo implements Comparable<FunctionVo>{
    @JSONField(name = "id")
    private Long funId;
    
    @JSONField(name = "text")
    private String funName;
    
    @JSONField(name = "checked")
    private boolean selected;

    public FunctionVo() {
    }

    public FunctionVo(Long funId, String funName) {
        super();
        this.funId = funId;
        this.funName = funName;
    }

    public FunctionVo(Long funId, String funName, boolean selected) {
        super();
        this.funId = funId;
        this.funName = funName;
        this.selected = selected;
    }

    public Long getFunId() {
        return funId;
    }

    public void setFunId(Long funId) {
        this.funId = funId;
    }

    public String getFunName() {
        return funName;
    }

    public void setFunName(String funName) {
        this.funName = funName;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((funId == null) ? 0 : funId.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        FunctionVo other = (FunctionVo) obj;
        if (funId == null) {
            if (other.funId != null)
                return false;
        } else if (!funId.equals(other.funId))
            return false;
        return true;
    }

    @Override
    public int compareTo(FunctionVo o) {
        return (int) (this.getFunId() - o.getFunId());
    }

    
}